{% load sidebar_menu %}
<nav class="sidebar bg-light border-end p-3" style="min-width:220px;">
    <div class="d-flex align-items-center mb-4">
        <span class="fs-4 fw-bold ms-2">{{ system_title }}</span>
    </div>
    <ul class="nav flex-column">
        <li class="nav-item mb-2">
            <a class="nav-link rounded px-3 py-2 d-flex align-items-center" href="/">
                <i class="bi bi-house me-2"></i> 首页
            </a>
        </li>
        {% get_sidebar_menus as sidebar_menus %}
        {% for menu in sidebar_menus %}
        <li class="nav-item mb-2">
            <a class="nav-link rounded px-3 py-2 d-flex align-items-center" href="{{ menu.url }}">
                {% if menu.icon %}<i class="bi {{ menu.icon }} me-2"></i>{% endif %} {{ menu.name }}
            </a>
        </li>
        {% endfor %}
    </ul>
    <style>
        .sidebar .nav-link:hover {
            background: #e9ecef;
            color: #000;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .sidebar {
            box-shadow: 2px 0 8px rgba(0,0,0,0.03);
        }
    </style>
</nav>